<?php

declare(strict_types=1);

namespace ImiApp\ApiServer\Api\Model\Base;

use Imi\Config\Annotation\ConfigValue;
use Imi\Model\Annotation\Column;
use Imi\Model\Annotation\DDL;
use Imi\Model\Annotation\Entity;
use Imi\Model\Annotation\Table;
use ImiApp\ImiServer\AbstractModel as Model;

/**
 * 订单管理 基类.
 *
 * @Entity(camel=false, bean=true, incrUpdate=false)
 * @Table(name=@ConfigValue(name="@app.models.ImiApp\ApiServer\Api\Model\Order.name", default="fa_order"), usePrefix=false, id={"id"}, dbPoolName=@ConfigValue(name="@app.models.ImiApp\ApiServer\Api\Model\Order.poolName"))
 * @DDL(sql="CREATE TABLE `fa_order` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `type` enum('goods','score') NOT NULL DEFAULT 'goods' COMMENT '订单类型:goods=商城订单,score=积分商城订单',
  `order_sn` varchar(60) NOT NULL COMMENT '订单号',
  `user_id` int(11) DEFAULT '0' COMMENT '用户',
  `activity_type` varchar(255) DEFAULT NULL COMMENT '活动类型',
  `goods_amount` decimal(10,2) NOT NULL DEFAULT '0.00' COMMENT '商品总价',
  `dispatch_amount` decimal(10,2) NOT NULL DEFAULT '0.00' COMMENT '总运费',
  `phone` varchar(20) DEFAULT NULL COMMENT '联系电话',
  `consignee` varchar(20) DEFAULT NULL COMMENT '收货人',
  `province_name` varchar(20) DEFAULT NULL COMMENT '省',
  `city_name` varchar(20) DEFAULT NULL COMMENT '市',
  `area_name` varchar(20) DEFAULT NULL COMMENT '区',
  `town_name` varchar(20) DEFAULT NULL COMMENT '乡镇',
  `address` varchar(255) DEFAULT NULL COMMENT '详细地址',
  `province_id` int(11) DEFAULT '0' COMMENT '省ID',
  `city_id` int(11) DEFAULT '0' COMMENT '市ID',
  `area_id` int(11) DEFAULT '0' COMMENT '区ID',
  `town_id` int(11) DEFAULT NULL COMMENT '镇ID',
  `status` tinyint(2) NOT NULL DEFAULT '0' COMMENT '订单状态:-2=交易关闭,-1=已取消,0=未支付,1=已支付,2=已完成',
  `invoice_status` enum('-1','0','1') NOT NULL DEFAULT '-1' COMMENT '发票开具状态:-1=不可开具,0=未申请,1=已申请',
  `memo` varchar(255) DEFAULT NULL COMMENT '商户备注',
  `remark` varchar(255) DEFAULT NULL COMMENT '用户备注',
  `total_amount` decimal(10,2) NOT NULL DEFAULT '0.00' COMMENT '订单总金额',
  `score_amount` decimal(11,2) NOT NULL DEFAULT '0.00' COMMENT '积分总数',
  `total_fee` decimal(10,2) NOT NULL DEFAULT '0.00' COMMENT '支付金额',
  `last_total_fee` decimal(10,2) NOT NULL DEFAULT '0.00' COMMENT '改价前金额',
  `discount_fee` decimal(10,2) NOT NULL DEFAULT '0.00' COMMENT '折扣总金额',
  `coupon_fee` decimal(10,2) NOT NULL DEFAULT '0.00' COMMENT '平台优惠券抵用金额',
  `store_coupon_fee` decimal(10,2) NOT NULL DEFAULT '0.00' COMMENT '店铺优惠券抵用金额',
  `activity_discount_money` decimal(10,2) NOT NULL DEFAULT '0.00' COMMENT '活动优惠',
  `dispatch_discount_money` decimal(10,2) NOT NULL DEFAULT '0.00' COMMENT '运费优惠',
  `pay_fee` decimal(10,2) NOT NULL DEFAULT '0.00' COMMENT '实际支付金额',
  `shell_fee` decimal(10,2) DEFAULT '0.00' COMMENT '支付贝壳总数',
  `score_fee` decimal(11,2) NOT NULL DEFAULT '0.00' COMMENT '积分支付数',
  `score_money_fee` decimal(11,2) NOT NULL DEFAULT '0.00' COMMENT '积分服务费金额',
  `goods_original_amount` decimal(10,2) NOT NULL DEFAULT '0.00' COMMENT '商品原价',
  `coupons_id` int(11) DEFAULT '0' COMMENT '优惠券 id',
  `transaction_id` varchar(60) DEFAULT NULL COMMENT '交易单号',
  `payment_json` varchar(2500) DEFAULT NULL COMMENT '交易原始数据',
  `pay_type` enum('wechat','alipay','wallet','score','shell','mix') DEFAULT NULL COMMENT '支付方式:wechat=微信支付,alipay=支付宝,wallet=钱包支付,score=积分支付,shell=贝壳支付,mix=混合支付',
  `paytime` int(11) DEFAULT NULL COMMENT '支付时间',
  `ext` varchar(2048) DEFAULT NULL COMMENT '附加字段',
  `platform` enum('H5','App','wxOfficialAccount','wxMiniProgram') DEFAULT 'App' COMMENT '平台:H5=H5,wxOfficialAccount=微信公众号,wxMiniProgram=微信小程序,App=App',
  `createtime` int(11) DEFAULT NULL COMMENT '创建时间',
  `updatetime` int(11) DEFAULT NULL COMMENT '更新时间',
  `deletetime` int(11) DEFAULT NULL COMMENT '删除时间',
  `store_id` int(10) DEFAULT NULL COMMENT '店铺ID',
  PRIMARY KEY (`id`) USING BTREE,
  UNIQUE KEY `order_sn` (`order_sn`) USING BTREE,
  KEY `user_id` (`user_id`) USING BTREE,
  KEY `status` (`status`) USING BTREE,
  KEY `createtime` (`createtime`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='订单管理'", decode="")
 *
 * @property int|null $id 
 * @property string|null $type 订单类型:goods=商城订单,score=积分商城订单
 * @property string|null $orderSn 订单号
 * @property int|null $userId 用户
 * @property string|null $activityType 活动类型
 * @property string|float|int|null $goodsAmount 商品总价
 * @property string|float|int|null $dispatchAmount 总运费
 * @property string|null $phone 联系电话
 * @property string|null $consignee 收货人
 * @property string|null $provinceName 省
 * @property string|null $cityName 市
 * @property string|null $areaName 区
 * @property string|null $townName 乡镇
 * @property string|null $address 详细地址
 * @property int|null $provinceId 省ID
 * @property int|null $cityId 市ID
 * @property int|null $areaId 区ID
 * @property int|null $townId 镇ID
 * @property int|null $status 订单状态:-2=交易关闭,-1=已取消,0=未支付,1=已支付,2=已完成
 * @property string|null $invoiceStatus 发票开具状态:-1=不可开具,0=未申请,1=已申请
 * @property string|null $memo 商户备注
 * @property string|null $remark 用户备注
 * @property string|float|int|null $totalAmount 订单总金额
 * @property string|float|int|null $scoreAmount 积分总数
 * @property string|float|int|null $totalFee 支付金额
 * @property string|float|int|null $lastTotalFee 改价前金额
 * @property string|float|int|null $discountFee 折扣总金额
 * @property string|float|int|null $couponFee 平台优惠券抵用金额
 * @property string|float|int|null $storeCouponFee 店铺优惠券抵用金额
 * @property string|float|int|null $activityDiscountMoney 活动优惠
 * @property string|float|int|null $dispatchDiscountMoney 运费优惠
 * @property string|float|int|null $payFee 实际支付金额
 * @property string|float|int|null $shellFee 支付贝壳总数
 * @property string|float|int|null $scoreFee 积分支付数
 * @property string|float|int|null $scoreMoneyFee 积分服务费金额
 * @property string|float|int|null $goodsOriginalAmount 商品原价
 * @property int|null $couponsId 优惠券 id
 * @property string|null $transactionId 交易单号
 * @property string|null $paymentJson 交易原始数据
 * @property string|null $payType 支付方式:wechat=微信支付,alipay=支付宝,wallet=钱包支付,score=积分支付,shell=贝壳支付,mix=混合支付
 * @property int|null $paytime 支付时间
 * @property string|null $ext 附加字段
 * @property string|null $platform 平台:H5=H5,wxOfficialAccount=微信公众号,wxMiniProgram=微信小程序,App=App
 * @property int|null $createtime 创建时间
 * @property int|null $updatetime 更新时间
 * @property int|null $deletetime 删除时间
 * @property int|null $storeId 店铺ID
 */
abstract class OrderBase extends Model
{
    /**
     * {@inheritdoc}
     */
    public const PRIMARY_KEY = 'id';

    /**
     * {@inheritdoc}
     */
    public const PRIMARY_KEYS = ["id"];

    /**
     * id.
     * @Column(name="id", type="int", length=11, accuracy=0, nullable=false, default="", isPrimaryKey=true, primaryKeyIndex=0, isAutoIncrement=true, unsigned=false, virtual=false)
     * @var int|null
     */
    protected ?int $id = NULL;

    /**
     * 获取 id.
     *
     * @return int|null
     */
    public function getId(): ?int
    {
        return $this->id;
    }

    /**
     * 赋值 id.
     * @param int|null $id id
     * @return static
     */
    public function setId($id)
    {
        $this->id = null === $id ? null : (int)$id;
        return $this;
    }

    /**
     * 订单类型:goods=商城订单,score=积分商城订单.
     * type
     * @Column(name="type", type="enum", length=0, accuracy=0, nullable=false, default="goods", isPrimaryKey=false, primaryKeyIndex=-1, isAutoIncrement=false, unsigned=false, virtual=false)
     * @var string|null
     */
    protected ?string $type = 'goods';

    /**
     * 获取 type - 订单类型:goods=商城订单,score=积分商城订单.
     *
     * @return string|null
     */
    public function getType(): ?string
    {
        return $this->type;
    }

    /**
     * 赋值 type - 订单类型:goods=商城订单,score=积分商城订单.
     * @param string|null $type type
     * @return static
     */
    public function setType($type)
    {
        $this->type = null === $type ? null : (string)$type;
        return $this;
    }

    /**
     * 订单号.
     * order_sn
     * @Column(name="order_sn", type="varchar", length=60, accuracy=0, nullable=false, default="", isPrimaryKey=false, primaryKeyIndex=-1, isAutoIncrement=false, unsigned=false, virtual=false)
     * @var string|null
     */
    protected ?string $orderSn = NULL;

    /**
     * 获取 orderSn - 订单号.
     *
     * @return string|null
     */
    public function getOrderSn(): ?string
    {
        return $this->orderSn;
    }

    /**
     * 赋值 orderSn - 订单号.
     * @param string|null $orderSn order_sn
     * @return static
     */
    public function setOrderSn($orderSn)
    {
        $this->orderSn = null === $orderSn ? null : (string)$orderSn;
        return $this;
    }

    /**
     * 用户.
     * user_id
     * @Column(name="user_id", type="int", length=11, accuracy=0, nullable=true, default="0", isPrimaryKey=false, primaryKeyIndex=-1, isAutoIncrement=false, unsigned=false, virtual=false)
     * @var int|null
     */
    protected ?int $userId = 0;

    /**
     * 获取 userId - 用户.
     *
     * @return int|null
     */
    public function getUserId(): ?int
    {
        return $this->userId;
    }

    /**
     * 赋值 userId - 用户.
     * @param int|null $userId user_id
     * @return static
     */
    public function setUserId($userId)
    {
        $this->userId = null === $userId ? null : (int)$userId;
        return $this;
    }

    /**
     * 活动类型.
     * activity_type
     * @Column(name="activity_type", type="varchar", length=255, accuracy=0, nullable=true, default="", isPrimaryKey=false, primaryKeyIndex=-1, isAutoIncrement=false, unsigned=false, virtual=false)
     * @var string|null
     */
    protected ?string $activityType = NULL;

    /**
     * 获取 activityType - 活动类型.
     *
     * @return string|null
     */
    public function getActivityType(): ?string
    {
        return $this->activityType;
    }

    /**
     * 赋值 activityType - 活动类型.
     * @param string|null $activityType activity_type
     * @return static
     */
    public function setActivityType($activityType)
    {
        $this->activityType = null === $activityType ? null : (string)$activityType;
        return $this;
    }

    /**
     * 商品总价.
     * goods_amount
     * @Column(name="goods_amount", type="decimal", length=10, accuracy=2, nullable=false, default="0.00", isPrimaryKey=false, primaryKeyIndex=-1, isAutoIncrement=false, unsigned=false, virtual=false)
     * @var string|float|int|null
     */
    protected $goodsAmount = NULL;

    /**
     * 获取 goodsAmount - 商品总价.
     *
     * @return string|float|int|null
     */
    public function getGoodsAmount()
    {
        return $this->goodsAmount;
    }

    /**
     * 赋值 goodsAmount - 商品总价.
     * @param string|float|int|null $goodsAmount goods_amount
     * @return static
     */
    public function setGoodsAmount($goodsAmount)
    {
        $this->goodsAmount = null === $goodsAmount ? null : $goodsAmount;
        return $this;
    }

    /**
     * 总运费.
     * dispatch_amount
     * @Column(name="dispatch_amount", type="decimal", length=10, accuracy=2, nullable=false, default="0.00", isPrimaryKey=false, primaryKeyIndex=-1, isAutoIncrement=false, unsigned=false, virtual=false)
     * @var string|float|int|null
     */
    protected $dispatchAmount = NULL;

    /**
     * 获取 dispatchAmount - 总运费.
     *
     * @return string|float|int|null
     */
    public function getDispatchAmount()
    {
        return $this->dispatchAmount;
    }

    /**
     * 赋值 dispatchAmount - 总运费.
     * @param string|float|int|null $dispatchAmount dispatch_amount
     * @return static
     */
    public function setDispatchAmount($dispatchAmount)
    {
        $this->dispatchAmount = null === $dispatchAmount ? null : $dispatchAmount;
        return $this;
    }

    /**
     * 联系电话.
     * phone
     * @Column(name="phone", type="varchar", length=20, accuracy=0, nullable=true, default="", isPrimaryKey=false, primaryKeyIndex=-1, isAutoIncrement=false, unsigned=false, virtual=false)
     * @var string|null
     */
    protected ?string $phone = NULL;

    /**
     * 获取 phone - 联系电话.
     *
     * @return string|null
     */
    public function getPhone(): ?string
    {
        return $this->phone;
    }

    /**
     * 赋值 phone - 联系电话.
     * @param string|null $phone phone
     * @return static
     */
    public function setPhone($phone)
    {
        $this->phone = null === $phone ? null : (string)$phone;
        return $this;
    }

    /**
     * 收货人.
     * consignee
     * @Column(name="consignee", type="varchar", length=20, accuracy=0, nullable=true, default="", isPrimaryKey=false, primaryKeyIndex=-1, isAutoIncrement=false, unsigned=false, virtual=false)
     * @var string|null
     */
    protected ?string $consignee = NULL;

    /**
     * 获取 consignee - 收货人.
     *
     * @return string|null
     */
    public function getConsignee(): ?string
    {
        return $this->consignee;
    }

    /**
     * 赋值 consignee - 收货人.
     * @param string|null $consignee consignee
     * @return static
     */
    public function setConsignee($consignee)
    {
        $this->consignee = null === $consignee ? null : (string)$consignee;
        return $this;
    }

    /**
     * 省.
     * province_name
     * @Column(name="province_name", type="varchar", length=20, accuracy=0, nullable=true, default="", isPrimaryKey=false, primaryKeyIndex=-1, isAutoIncrement=false, unsigned=false, virtual=false)
     * @var string|null
     */
    protected ?string $provinceName = NULL;

    /**
     * 获取 provinceName - 省.
     *
     * @return string|null
     */
    public function getProvinceName(): ?string
    {
        return $this->provinceName;
    }

    /**
     * 赋值 provinceName - 省.
     * @param string|null $provinceName province_name
     * @return static
     */
    public function setProvinceName($provinceName)
    {
        $this->provinceName = null === $provinceName ? null : (string)$provinceName;
        return $this;
    }

    /**
     * 市.
     * city_name
     * @Column(name="city_name", type="varchar", length=20, accuracy=0, nullable=true, default="", isPrimaryKey=false, primaryKeyIndex=-1, isAutoIncrement=false, unsigned=false, virtual=false)
     * @var string|null
     */
    protected ?string $cityName = NULL;

    /**
     * 获取 cityName - 市.
     *
     * @return string|null
     */
    public function getCityName(): ?string
    {
        return $this->cityName;
    }

    /**
     * 赋值 cityName - 市.
     * @param string|null $cityName city_name
     * @return static
     */
    public function setCityName($cityName)
    {
        $this->cityName = null === $cityName ? null : (string)$cityName;
        return $this;
    }

    /**
     * 区.
     * area_name
     * @Column(name="area_name", type="varchar", length=20, accuracy=0, nullable=true, default="", isPrimaryKey=false, primaryKeyIndex=-1, isAutoIncrement=false, unsigned=false, virtual=false)
     * @var string|null
     */
    protected ?string $areaName = NULL;

    /**
     * 获取 areaName - 区.
     *
     * @return string|null
     */
    public function getAreaName(): ?string
    {
        return $this->areaName;
    }

    /**
     * 赋值 areaName - 区.
     * @param string|null $areaName area_name
     * @return static
     */
    public function setAreaName($areaName)
    {
        $this->areaName = null === $areaName ? null : (string)$areaName;
        return $this;
    }

    /**
     * 乡镇.
     * town_name
     * @Column(name="town_name", type="varchar", length=20, accuracy=0, nullable=true, default="", isPrimaryKey=false, primaryKeyIndex=-1, isAutoIncrement=false, unsigned=false, virtual=false)
     * @var string|null
     */
    protected ?string $townName = NULL;

    /**
     * 获取 townName - 乡镇.
     *
     * @return string|null
     */
    public function getTownName(): ?string
    {
        return $this->townName;
    }

    /**
     * 赋值 townName - 乡镇.
     * @param string|null $townName town_name
     * @return static
     */
    public function setTownName($townName)
    {
        $this->townName = null === $townName ? null : (string)$townName;
        return $this;
    }

    /**
     * 详细地址.
     * address
     * @Column(name="address", type="varchar", length=255, accuracy=0, nullable=true, default="", isPrimaryKey=false, primaryKeyIndex=-1, isAutoIncrement=false, unsigned=false, virtual=false)
     * @var string|null
     */
    protected ?string $address = NULL;

    /**
     * 获取 address - 详细地址.
     *
     * @return string|null
     */
    public function getAddress(): ?string
    {
        return $this->address;
    }

    /**
     * 赋值 address - 详细地址.
     * @param string|null $address address
     * @return static
     */
    public function setAddress($address)
    {
        $this->address = null === $address ? null : (string)$address;
        return $this;
    }

    /**
     * 省ID.
     * province_id
     * @Column(name="province_id", type="int", length=11, accuracy=0, nullable=true, default="0", isPrimaryKey=false, primaryKeyIndex=-1, isAutoIncrement=false, unsigned=false, virtual=false)
     * @var int|null
     */
    protected ?int $provinceId = 0;

    /**
     * 获取 provinceId - 省ID.
     *
     * @return int|null
     */
    public function getProvinceId(): ?int
    {
        return $this->provinceId;
    }

    /**
     * 赋值 provinceId - 省ID.
     * @param int|null $provinceId province_id
     * @return static
     */
    public function setProvinceId($provinceId)
    {
        $this->provinceId = null === $provinceId ? null : (int)$provinceId;
        return $this;
    }

    /**
     * 市ID.
     * city_id
     * @Column(name="city_id", type="int", length=11, accuracy=0, nullable=true, default="0", isPrimaryKey=false, primaryKeyIndex=-1, isAutoIncrement=false, unsigned=false, virtual=false)
     * @var int|null
     */
    protected ?int $cityId = 0;

    /**
     * 获取 cityId - 市ID.
     *
     * @return int|null
     */
    public function getCityId(): ?int
    {
        return $this->cityId;
    }

    /**
     * 赋值 cityId - 市ID.
     * @param int|null $cityId city_id
     * @return static
     */
    public function setCityId($cityId)
    {
        $this->cityId = null === $cityId ? null : (int)$cityId;
        return $this;
    }

    /**
     * 区ID.
     * area_id
     * @Column(name="area_id", type="int", length=11, accuracy=0, nullable=true, default="0", isPrimaryKey=false, primaryKeyIndex=-1, isAutoIncrement=false, unsigned=false, virtual=false)
     * @var int|null
     */
    protected ?int $areaId = 0;

    /**
     * 获取 areaId - 区ID.
     *
     * @return int|null
     */
    public function getAreaId(): ?int
    {
        return $this->areaId;
    }

    /**
     * 赋值 areaId - 区ID.
     * @param int|null $areaId area_id
     * @return static
     */
    public function setAreaId($areaId)
    {
        $this->areaId = null === $areaId ? null : (int)$areaId;
        return $this;
    }

    /**
     * 镇ID.
     * town_id
     * @Column(name="town_id", type="int", length=11, accuracy=0, nullable=true, default="", isPrimaryKey=false, primaryKeyIndex=-1, isAutoIncrement=false, unsigned=false, virtual=false)
     * @var int|null
     */
    protected ?int $townId = NULL;

    /**
     * 获取 townId - 镇ID.
     *
     * @return int|null
     */
    public function getTownId(): ?int
    {
        return $this->townId;
    }

    /**
     * 赋值 townId - 镇ID.
     * @param int|null $townId town_id
     * @return static
     */
    public function setTownId($townId)
    {
        $this->townId = null === $townId ? null : (int)$townId;
        return $this;
    }

    /**
     * 订单状态:-2=交易关闭,-1=已取消,0=未支付,1=已支付,2=已完成.
     * status
     * @Column(name="status", type="tinyint", length=2, accuracy=0, nullable=false, default="0", isPrimaryKey=false, primaryKeyIndex=-1, isAutoIncrement=false, unsigned=false, virtual=false)
     * @var int|null
     */
    protected ?int $status = 0;

    /**
     * 获取 status - 订单状态:-2=交易关闭,-1=已取消,0=未支付,1=已支付,2=已完成.
     *
     * @return int|null
     */
    public function getStatus(): ?int
    {
        return $this->status;
    }

    /**
     * 赋值 status - 订单状态:-2=交易关闭,-1=已取消,0=未支付,1=已支付,2=已完成.
     * @param int|null $status status
     * @return static
     */
    public function setStatus($status)
    {
        $this->status = null === $status ? null : (int)$status;
        return $this;
    }

    /**
     * 发票开具状态:-1=不可开具,0=未申请,1=已申请.
     * invoice_status
     * @Column(name="invoice_status", type="enum", length=0, accuracy=0, nullable=false, default="-1", isPrimaryKey=false, primaryKeyIndex=-1, isAutoIncrement=false, unsigned=false, virtual=false)
     * @var string|null
     */
    protected ?string $invoiceStatus = '-1';

    /**
     * 获取 invoiceStatus - 发票开具状态:-1=不可开具,0=未申请,1=已申请.
     *
     * @return string|null
     */
    public function getInvoiceStatus(): ?string
    {
        return $this->invoiceStatus;
    }

    /**
     * 赋值 invoiceStatus - 发票开具状态:-1=不可开具,0=未申请,1=已申请.
     * @param string|null $invoiceStatus invoice_status
     * @return static
     */
    public function setInvoiceStatus($invoiceStatus)
    {
        $this->invoiceStatus = null === $invoiceStatus ? null : (string)$invoiceStatus;
        return $this;
    }

    /**
     * 商户备注.
     * memo
     * @Column(name="memo", type="varchar", length=255, accuracy=0, nullable=true, default="", isPrimaryKey=false, primaryKeyIndex=-1, isAutoIncrement=false, unsigned=false, virtual=false)
     * @var string|null
     */
    protected ?string $memo = NULL;

    /**
     * 获取 memo - 商户备注.
     *
     * @return string|null
     */
    public function getMemo(): ?string
    {
        return $this->memo;
    }

    /**
     * 赋值 memo - 商户备注.
     * @param string|null $memo memo
     * @return static
     */
    public function setMemo($memo)
    {
        $this->memo = null === $memo ? null : (string)$memo;
        return $this;
    }

    /**
     * 用户备注.
     * remark
     * @Column(name="remark", type="varchar", length=255, accuracy=0, nullable=true, default="", isPrimaryKey=false, primaryKeyIndex=-1, isAutoIncrement=false, unsigned=false, virtual=false)
     * @var string|null
     */
    protected ?string $remark = NULL;

    /**
     * 获取 remark - 用户备注.
     *
     * @return string|null
     */
    public function getRemark(): ?string
    {
        return $this->remark;
    }

    /**
     * 赋值 remark - 用户备注.
     * @param string|null $remark remark
     * @return static
     */
    public function setRemark($remark)
    {
        $this->remark = null === $remark ? null : (string)$remark;
        return $this;
    }

    /**
     * 订单总金额.
     * total_amount
     * @Column(name="total_amount", type="decimal", length=10, accuracy=2, nullable=false, default="0.00", isPrimaryKey=false, primaryKeyIndex=-1, isAutoIncrement=false, unsigned=false, virtual=false)
     * @var string|float|int|null
     */
    protected $totalAmount = NULL;

    /**
     * 获取 totalAmount - 订单总金额.
     *
     * @return string|float|int|null
     */
    public function getTotalAmount()
    {
        return $this->totalAmount;
    }

    /**
     * 赋值 totalAmount - 订单总金额.
     * @param string|float|int|null $totalAmount total_amount
     * @return static
     */
    public function setTotalAmount($totalAmount)
    {
        $this->totalAmount = null === $totalAmount ? null : $totalAmount;
        return $this;
    }

    /**
     * 积分总数.
     * score_amount
     * @Column(name="score_amount", type="decimal", length=11, accuracy=2, nullable=false, default="0.00", isPrimaryKey=false, primaryKeyIndex=-1, isAutoIncrement=false, unsigned=false, virtual=false)
     * @var string|float|int|null
     */
    protected $scoreAmount = NULL;

    /**
     * 获取 scoreAmount - 积分总数.
     *
     * @return string|float|int|null
     */
    public function getScoreAmount()
    {
        return $this->scoreAmount;
    }

    /**
     * 赋值 scoreAmount - 积分总数.
     * @param string|float|int|null $scoreAmount score_amount
     * @return static
     */
    public function setScoreAmount($scoreAmount)
    {
        $this->scoreAmount = null === $scoreAmount ? null : $scoreAmount;
        return $this;
    }

    /**
     * 支付金额.
     * total_fee
     * @Column(name="total_fee", type="decimal", length=10, accuracy=2, nullable=false, default="0.00", isPrimaryKey=false, primaryKeyIndex=-1, isAutoIncrement=false, unsigned=false, virtual=false)
     * @var string|float|int|null
     */
    protected $totalFee = NULL;

    /**
     * 获取 totalFee - 支付金额.
     *
     * @return string|float|int|null
     */
    public function getTotalFee()
    {
        return $this->totalFee;
    }

    /**
     * 赋值 totalFee - 支付金额.
     * @param string|float|int|null $totalFee total_fee
     * @return static
     */
    public function setTotalFee($totalFee)
    {
        $this->totalFee = null === $totalFee ? null : $totalFee;
        return $this;
    }

    /**
     * 改价前金额.
     * last_total_fee
     * @Column(name="last_total_fee", type="decimal", length=10, accuracy=2, nullable=false, default="0.00", isPrimaryKey=false, primaryKeyIndex=-1, isAutoIncrement=false, unsigned=false, virtual=false)
     * @var string|float|int|null
     */
    protected $lastTotalFee = NULL;

    /**
     * 获取 lastTotalFee - 改价前金额.
     *
     * @return string|float|int|null
     */
    public function getLastTotalFee()
    {
        return $this->lastTotalFee;
    }

    /**
     * 赋值 lastTotalFee - 改价前金额.
     * @param string|float|int|null $lastTotalFee last_total_fee
     * @return static
     */
    public function setLastTotalFee($lastTotalFee)
    {
        $this->lastTotalFee = null === $lastTotalFee ? null : $lastTotalFee;
        return $this;
    }

    /**
     * 折扣总金额.
     * discount_fee
     * @Column(name="discount_fee", type="decimal", length=10, accuracy=2, nullable=false, default="0.00", isPrimaryKey=false, primaryKeyIndex=-1, isAutoIncrement=false, unsigned=false, virtual=false)
     * @var string|float|int|null
     */
    protected $discountFee = NULL;

    /**
     * 获取 discountFee - 折扣总金额.
     *
     * @return string|float|int|null
     */
    public function getDiscountFee()
    {
        return $this->discountFee;
    }

    /**
     * 赋值 discountFee - 折扣总金额.
     * @param string|float|int|null $discountFee discount_fee
     * @return static
     */
    public function setDiscountFee($discountFee)
    {
        $this->discountFee = null === $discountFee ? null : $discountFee;
        return $this;
    }

    /**
     * 平台优惠券抵用金额.
     * coupon_fee
     * @Column(name="coupon_fee", type="decimal", length=10, accuracy=2, nullable=false, default="0.00", isPrimaryKey=false, primaryKeyIndex=-1, isAutoIncrement=false, unsigned=false, virtual=false)
     * @var string|float|int|null
     */
    protected $couponFee = NULL;

    /**
     * 获取 couponFee - 平台优惠券抵用金额.
     *
     * @return string|float|int|null
     */
    public function getCouponFee()
    {
        return $this->couponFee;
    }

    /**
     * 赋值 couponFee - 平台优惠券抵用金额.
     * @param string|float|int|null $couponFee coupon_fee
     * @return static
     */
    public function setCouponFee($couponFee)
    {
        $this->couponFee = null === $couponFee ? null : $couponFee;
        return $this;
    }

    /**
     * 店铺优惠券抵用金额.
     * store_coupon_fee
     * @Column(name="store_coupon_fee", type="decimal", length=10, accuracy=2, nullable=false, default="0.00", isPrimaryKey=false, primaryKeyIndex=-1, isAutoIncrement=false, unsigned=false, virtual=false)
     * @var string|float|int|null
     */
    protected $storeCouponFee = NULL;

    /**
     * 获取 storeCouponFee - 店铺优惠券抵用金额.
     *
     * @return string|float|int|null
     */
    public function getStoreCouponFee()
    {
        return $this->storeCouponFee;
    }

    /**
     * 赋值 storeCouponFee - 店铺优惠券抵用金额.
     * @param string|float|int|null $storeCouponFee store_coupon_fee
     * @return static
     */
    public function setStoreCouponFee($storeCouponFee)
    {
        $this->storeCouponFee = null === $storeCouponFee ? null : $storeCouponFee;
        return $this;
    }

    /**
     * 活动优惠.
     * activity_discount_money
     * @Column(name="activity_discount_money", type="decimal", length=10, accuracy=2, nullable=false, default="0.00", isPrimaryKey=false, primaryKeyIndex=-1, isAutoIncrement=false, unsigned=false, virtual=false)
     * @var string|float|int|null
     */
    protected $activityDiscountMoney = NULL;

    /**
     * 获取 activityDiscountMoney - 活动优惠.
     *
     * @return string|float|int|null
     */
    public function getActivityDiscountMoney()
    {
        return $this->activityDiscountMoney;
    }

    /**
     * 赋值 activityDiscountMoney - 活动优惠.
     * @param string|float|int|null $activityDiscountMoney activity_discount_money
     * @return static
     */
    public function setActivityDiscountMoney($activityDiscountMoney)
    {
        $this->activityDiscountMoney = null === $activityDiscountMoney ? null : $activityDiscountMoney;
        return $this;
    }

    /**
     * 运费优惠.
     * dispatch_discount_money
     * @Column(name="dispatch_discount_money", type="decimal", length=10, accuracy=2, nullable=false, default="0.00", isPrimaryKey=false, primaryKeyIndex=-1, isAutoIncrement=false, unsigned=false, virtual=false)
     * @var string|float|int|null
     */
    protected $dispatchDiscountMoney = NULL;

    /**
     * 获取 dispatchDiscountMoney - 运费优惠.
     *
     * @return string|float|int|null
     */
    public function getDispatchDiscountMoney()
    {
        return $this->dispatchDiscountMoney;
    }

    /**
     * 赋值 dispatchDiscountMoney - 运费优惠.
     * @param string|float|int|null $dispatchDiscountMoney dispatch_discount_money
     * @return static
     */
    public function setDispatchDiscountMoney($dispatchDiscountMoney)
    {
        $this->dispatchDiscountMoney = null === $dispatchDiscountMoney ? null : $dispatchDiscountMoney;
        return $this;
    }

    /**
     * 实际支付金额.
     * pay_fee
     * @Column(name="pay_fee", type="decimal", length=10, accuracy=2, nullable=false, default="0.00", isPrimaryKey=false, primaryKeyIndex=-1, isAutoIncrement=false, unsigned=false, virtual=false)
     * @var string|float|int|null
     */
    protected $payFee = NULL;

    /**
     * 获取 payFee - 实际支付金额.
     *
     * @return string|float|int|null
     */
    public function getPayFee()
    {
        return $this->payFee;
    }

    /**
     * 赋值 payFee - 实际支付金额.
     * @param string|float|int|null $payFee pay_fee
     * @return static
     */
    public function setPayFee($payFee)
    {
        $this->payFee = null === $payFee ? null : $payFee;
        return $this;
    }

    /**
     * 支付贝壳总数.
     * shell_fee
     * @Column(name="shell_fee", type="decimal", length=10, accuracy=2, nullable=true, default="0.00", isPrimaryKey=false, primaryKeyIndex=-1, isAutoIncrement=false, unsigned=false, virtual=false)
     * @var string|float|int|null
     */
    protected $shellFee = NULL;

    /**
     * 获取 shellFee - 支付贝壳总数.
     *
     * @return string|float|int|null
     */
    public function getShellFee()
    {
        return $this->shellFee;
    }

    /**
     * 赋值 shellFee - 支付贝壳总数.
     * @param string|float|int|null $shellFee shell_fee
     * @return static
     */
    public function setShellFee($shellFee)
    {
        $this->shellFee = null === $shellFee ? null : $shellFee;
        return $this;
    }

    /**
     * 积分支付数.
     * score_fee
     * @Column(name="score_fee", type="decimal", length=11, accuracy=2, nullable=false, default="0.00", isPrimaryKey=false, primaryKeyIndex=-1, isAutoIncrement=false, unsigned=false, virtual=false)
     * @var string|float|int|null
     */
    protected $scoreFee = NULL;

    /**
     * 获取 scoreFee - 积分支付数.
     *
     * @return string|float|int|null
     */
    public function getScoreFee()
    {
        return $this->scoreFee;
    }

    /**
     * 赋值 scoreFee - 积分支付数.
     * @param string|float|int|null $scoreFee score_fee
     * @return static
     */
    public function setScoreFee($scoreFee)
    {
        $this->scoreFee = null === $scoreFee ? null : $scoreFee;
        return $this;
    }

    /**
     * 积分服务费金额.
     * score_money_fee
     * @Column(name="score_money_fee", type="decimal", length=11, accuracy=2, nullable=false, default="0.00", isPrimaryKey=false, primaryKeyIndex=-1, isAutoIncrement=false, unsigned=false, virtual=false)
     * @var string|float|int|null
     */
    protected $scoreMoneyFee = NULL;

    /**
     * 获取 scoreMoneyFee - 积分服务费金额.
     *
     * @return string|float|int|null
     */
    public function getScoreMoneyFee()
    {
        return $this->scoreMoneyFee;
    }

    /**
     * 赋值 scoreMoneyFee - 积分服务费金额.
     * @param string|float|int|null $scoreMoneyFee score_money_fee
     * @return static
     */
    public function setScoreMoneyFee($scoreMoneyFee)
    {
        $this->scoreMoneyFee = null === $scoreMoneyFee ? null : $scoreMoneyFee;
        return $this;
    }

    /**
     * 商品原价.
     * goods_original_amount
     * @Column(name="goods_original_amount", type="decimal", length=10, accuracy=2, nullable=false, default="0.00", isPrimaryKey=false, primaryKeyIndex=-1, isAutoIncrement=false, unsigned=false, virtual=false)
     * @var string|float|int|null
     */
    protected $goodsOriginalAmount = NULL;

    /**
     * 获取 goodsOriginalAmount - 商品原价.
     *
     * @return string|float|int|null
     */
    public function getGoodsOriginalAmount()
    {
        return $this->goodsOriginalAmount;
    }

    /**
     * 赋值 goodsOriginalAmount - 商品原价.
     * @param string|float|int|null $goodsOriginalAmount goods_original_amount
     * @return static
     */
    public function setGoodsOriginalAmount($goodsOriginalAmount)
    {
        $this->goodsOriginalAmount = null === $goodsOriginalAmount ? null : $goodsOriginalAmount;
        return $this;
    }

    /**
     * 优惠券 id.
     * coupons_id
     * @Column(name="coupons_id", type="int", length=11, accuracy=0, nullable=true, default="0", isPrimaryKey=false, primaryKeyIndex=-1, isAutoIncrement=false, unsigned=false, virtual=false)
     * @var int|null
     */
    protected ?int $couponsId = 0;

    /**
     * 获取 couponsId - 优惠券 id.
     *
     * @return int|null
     */
    public function getCouponsId(): ?int
    {
        return $this->couponsId;
    }

    /**
     * 赋值 couponsId - 优惠券 id.
     * @param int|null $couponsId coupons_id
     * @return static
     */
    public function setCouponsId($couponsId)
    {
        $this->couponsId = null === $couponsId ? null : (int)$couponsId;
        return $this;
    }

    /**
     * 交易单号.
     * transaction_id
     * @Column(name="transaction_id", type="varchar", length=60, accuracy=0, nullable=true, default="", isPrimaryKey=false, primaryKeyIndex=-1, isAutoIncrement=false, unsigned=false, virtual=false)
     * @var string|null
     */
    protected ?string $transactionId = NULL;

    /**
     * 获取 transactionId - 交易单号.
     *
     * @return string|null
     */
    public function getTransactionId(): ?string
    {
        return $this->transactionId;
    }

    /**
     * 赋值 transactionId - 交易单号.
     * @param string|null $transactionId transaction_id
     * @return static
     */
    public function setTransactionId($transactionId)
    {
        $this->transactionId = null === $transactionId ? null : (string)$transactionId;
        return $this;
    }

    /**
     * 交易原始数据.
     * payment_json
     * @Column(name="payment_json", type="varchar", length=2500, accuracy=0, nullable=true, default="", isPrimaryKey=false, primaryKeyIndex=-1, isAutoIncrement=false, unsigned=false, virtual=false)
     * @var string|null
     */
    protected ?string $paymentJson = NULL;

    /**
     * 获取 paymentJson - 交易原始数据.
     *
     * @return string|null
     */
    public function getPaymentJson(): ?string
    {
        return $this->paymentJson;
    }

    /**
     * 赋值 paymentJson - 交易原始数据.
     * @param string|null $paymentJson payment_json
     * @return static
     */
    public function setPaymentJson($paymentJson)
    {
        $this->paymentJson = null === $paymentJson ? null : (string)$paymentJson;
        return $this;
    }

    /**
     * 支付方式:wechat=微信支付,alipay=支付宝,wallet=钱包支付,score=积分支付,shell=贝壳支付,mix=混合支付.
     * pay_type
     * @Column(name="pay_type", type="enum", length=0, accuracy=0, nullable=true, default="", isPrimaryKey=false, primaryKeyIndex=-1, isAutoIncrement=false, unsigned=false, virtual=false)
     * @var string|null
     */
    protected ?string $payType = NULL;

    /**
     * 获取 payType - 支付方式:wechat=微信支付,alipay=支付宝,wallet=钱包支付,score=积分支付,shell=贝壳支付,mix=混合支付.
     *
     * @return string|null
     */
    public function getPayType(): ?string
    {
        return $this->payType;
    }

    /**
     * 赋值 payType - 支付方式:wechat=微信支付,alipay=支付宝,wallet=钱包支付,score=积分支付,shell=贝壳支付,mix=混合支付.
     * @param string|null $payType pay_type
     * @return static
     */
    public function setPayType($payType)
    {
        $this->payType = null === $payType ? null : (string)$payType;
        return $this;
    }

    /**
     * 支付时间.
     * paytime
     * @Column(name="paytime", type="int", length=11, accuracy=0, nullable=true, default="", isPrimaryKey=false, primaryKeyIndex=-1, isAutoIncrement=false, unsigned=false, virtual=false)
     * @var int|null
     */
    protected ?int $paytime = NULL;

    /**
     * 获取 paytime - 支付时间.
     *
     * @return int|null
     */
    public function getPaytime(): ?int
    {
        return $this->paytime;
    }

    /**
     * 赋值 paytime - 支付时间.
     * @param int|null $paytime paytime
     * @return static
     */
    public function setPaytime($paytime)
    {
        $this->paytime = null === $paytime ? null : (int)$paytime;
        return $this;
    }

    /**
     * 附加字段.
     * ext
     * @Column(name="ext", type="varchar", length=2048, accuracy=0, nullable=true, default="", isPrimaryKey=false, primaryKeyIndex=-1, isAutoIncrement=false, unsigned=false, virtual=false)
     * @var string|null
     */
    protected ?string $ext = NULL;

    /**
     * 获取 ext - 附加字段.
     *
     * @return string|null
     */
    public function getExt(): ?string
    {
        return $this->ext;
    }

    /**
     * 赋值 ext - 附加字段.
     * @param string|null $ext ext
     * @return static
     */
    public function setExt($ext)
    {
        $this->ext = null === $ext ? null : (string)$ext;
        return $this;
    }

    /**
     * 平台:H5=H5,wxOfficialAccount=微信公众号,wxMiniProgram=微信小程序,App=App.
     * platform
     * @Column(name="platform", type="enum", length=0, accuracy=0, nullable=true, default="App", isPrimaryKey=false, primaryKeyIndex=-1, isAutoIncrement=false, unsigned=false, virtual=false)
     * @var string|null
     */
    protected ?string $platform = 'App';

    /**
     * 获取 platform - 平台:H5=H5,wxOfficialAccount=微信公众号,wxMiniProgram=微信小程序,App=App.
     *
     * @return string|null
     */
    public function getPlatform(): ?string
    {
        return $this->platform;
    }

    /**
     * 赋值 platform - 平台:H5=H5,wxOfficialAccount=微信公众号,wxMiniProgram=微信小程序,App=App.
     * @param string|null $platform platform
     * @return static
     */
    public function setPlatform($platform)
    {
        $this->platform = null === $platform ? null : (string)$platform;
        return $this;
    }

    /**
     * 创建时间.
     * createtime
     * @Column(name="createtime", type="int", length=11, accuracy=0, nullable=true, default="", isPrimaryKey=false, primaryKeyIndex=-1, isAutoIncrement=false, unsigned=false, virtual=false)
     * @var int|null
     */
    protected ?int $createtime = NULL;

    /**
     * 获取 createtime - 创建时间.
     *
     * @return int|null
     */
    public function getCreatetime(): ?int
    {
        return $this->createtime;
    }

    /**
     * 赋值 createtime - 创建时间.
     * @param int|null $createtime createtime
     * @return static
     */
    public function setCreatetime($createtime)
    {
        $this->createtime = null === $createtime ? null : (int)$createtime;
        return $this;
    }

    /**
     * 更新时间.
     * updatetime
     * @Column(name="updatetime", type="int", length=11, accuracy=0, nullable=true, default="", isPrimaryKey=false, primaryKeyIndex=-1, isAutoIncrement=false, unsigned=false, virtual=false)
     * @var int|null
     */
    protected ?int $updatetime = NULL;

    /**
     * 获取 updatetime - 更新时间.
     *
     * @return int|null
     */
    public function getUpdatetime(): ?int
    {
        return $this->updatetime;
    }

    /**
     * 赋值 updatetime - 更新时间.
     * @param int|null $updatetime updatetime
     * @return static
     */
    public function setUpdatetime($updatetime)
    {
        $this->updatetime = null === $updatetime ? null : (int)$updatetime;
        return $this;
    }

    /**
     * 删除时间.
     * deletetime
     * @Column(name="deletetime", type="int", length=11, accuracy=0, nullable=true, default="", isPrimaryKey=false, primaryKeyIndex=-1, isAutoIncrement=false, unsigned=false, virtual=false)
     * @var int|null
     */
    protected ?int $deletetime = NULL;

    /**
     * 获取 deletetime - 删除时间.
     *
     * @return int|null
     */
    public function getDeletetime(): ?int
    {
        return $this->deletetime;
    }

    /**
     * 赋值 deletetime - 删除时间.
     * @param int|null $deletetime deletetime
     * @return static
     */
    public function setDeletetime($deletetime)
    {
        $this->deletetime = null === $deletetime ? null : (int)$deletetime;
        return $this;
    }

    /**
     * 店铺ID.
     * store_id
     * @Column(name="store_id", type="int", length=10, accuracy=0, nullable=true, default="", isPrimaryKey=false, primaryKeyIndex=-1, isAutoIncrement=false, unsigned=false, virtual=false)
     * @var int|null
     */
    protected ?int $storeId = NULL;

    /**
     * 获取 storeId - 店铺ID.
     *
     * @return int|null
     */
    public function getStoreId(): ?int
    {
        return $this->storeId;
    }

    /**
     * 赋值 storeId - 店铺ID.
     * @param int|null $storeId store_id
     * @return static
     */
    public function setStoreId($storeId)
    {
        $this->storeId = null === $storeId ? null : (int)$storeId;
        return $this;
    }

}
